﻿<UserControl x:Class="TimePunch.Metro.Wpf.Controls.AppBar.ApplicationBar"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="100" d:DesignWidth="300">
   
    <UserControl.RenderTransform>
        <TranslateTransform x:Name="LayoutTranslation"/>
    </UserControl.RenderTransform>
        
    
    <!-- Navigation Area -->
    <Border>
        
        <Grid Margin="12 6">

            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            
            <!-- Application Bar Icons -->
            <StackPanel Orientation="Horizontal" Grid.Column="1" x:Name="IconPanel"/>

            <!-- Fixed button to show menu items -->
            <Button Grid.Column="2" HorizontalAlignment="Right"
                        Style="{StaticResource ChromeButtonStyle}" 
                        Margin="3" 
                        Click="SwitchMenuItemVisibility">

                <Button.Content>
                    <Image Source="/TpMetroWpfLibrary;component/Images/appbar.overflowdots.png" Stretch="UniformToFill" 
                           Width="{StaticResource ApplicationBarIconSize}" Height="{StaticResource ApplicationBarIconSize}" />
                </Button.Content>
            </Button>

            <!-- Application Bar Menu Items -->
            <StackPanel Orientation="Vertical" HorizontalAlignment="Left" Grid.ColumnSpan="3" Grid.Row="1" x:Name="MenuItemPanel"/>
        </Grid>
    </Border>
</UserControl>
